/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package deatax;

import java.util.ArrayList;

/**
 *
 * @author pson
 */
public class Victory {

    private ArrayList<VictoryCondition> win_conditions;
    private ArrayList<LossCondition> loss_conditions;

    public boolean checkWin(GameData data) {
        boolean win = true;
        for (VictoryCondition vc : win_conditions) {
            win = win && vc.met(data);
        }
        return win;
    }

    public boolean checkLose(GameData data) {
        boolean lose = true;
        for (LossCondition lc : loss_conditions) {
            lose = lose && lc.met(data);
        }
        return lose;
    }
}
